home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Xconq 7.1.0 / src / xconq-7.1.0 / curses / Makefile.in < prev   
Encoding:
Makefile  |  1996-07-07  |  2.8 KB  |  138 lines  |  [TEXT/R*ch]

  1. # Makefile for curses interface to Xconq.
  2. # Copyright (C) 1991, 1992, 1993, 1994, 1995 Stanley T. Shebs.
  3.  
  4. # Xconq is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # Where cconq itself lives.
  10.  
  11. prefix = /usr/games
  12.  
  13. exec_prefix = $(prefix)
  14. bindir = $(exec_prefix)/bin
  15. libdir = $(exec_prefix)/lib
  16. datadir = $(prefix)/lib/xconq
  17. mandir = $(prefix)/man
  18. man6dir = $(mandir)/man6
  19. infodir = $(prefix)/info
  20. docdir = $(datadir)/doc
  21.  
  22. srcdir = .
  23.  
  24. krnsrcdir = $(srcdir)/../kernel
  25.  
  26. SHELL = /bin/sh
  27.  
  28. INSTALL = install -c
  29. INSTALL_PROGRAM = $(INSTALL)
  30. INSTALL_DATA = $(INSTALL)
  31.  
  32. CC = cc
  33.  
  34. CFLAGS = -g
  35.  
  36. CURSES_LIB = -lcurses -ltermlib
  37.  
  38. KERNEL_LIB = ../kernel/libconq.a
  39.  
  40. LOW_LIB = ../kernel/libconqlow.a
  41.  
  42. # Host and target-dependent makefile fragments come in here.
  43. ####
  44. # End of host and target-dependent makefile fragments.
  45.  
  46. GAME_H = $(krnsrcdir)/game.h \
  47.      $(krnsrcdir)/gvar.def \
  48.      $(krnsrcdir)/utype.def \
  49.      $(krnsrcdir)/mtype.def \
  50.      $(krnsrcdir)/ttype.def \
  51.      $(krnsrcdir)/table.def
  52.  
  53. UNIT_H = $(krnsrcdir)/unit.h \
  54.      $(krnsrcdir)/action.def \
  55.      $(krnsrcdir)/plan.def \
  56.      $(krnsrcdir)/task.def
  57.  
  58. ALL_H = $(krnsrcdir)/conq.h \
  59.     $(krnsrcdir)/config.h \
  60.     $(krnsrcdir)/misc.h \
  61.     $(krnsrcdir)/dir.h \
  62.     $(krnsrcdir)/lisp.h \
  63.     $(krnsrcdir)/module.h \
  64.     $(GAME_H) \
  65.     $(krnsrcdir)/player.h \
  66.     $(krnsrcdir)/side.h \
  67.     $(UNIT_H) \
  68.     $(krnsrcdir)/goal.def \
  69.     $(krnsrcdir)/world.h \
  70.     $(krnsrcdir)/score.h \
  71.     $(krnsrcdir)/history.h \
  72.     $(krnsrcdir)/ai.h
  73.  
  74. C_H = $(srcdir)/cconq.h
  75.  
  76. OBJS = cconq.o cdraw.o ccmd.o
  77.  
  78. UNIX_CFLAGS = -DUNIX
  79.  
  80. # -Dcbreak=crmode
  81.  
  82. ALL_CFLAGS = $(CFLAGS) $(UNIX_CFLAGS) -I$(srcdir) -I$(krnsrcdir)
  83.  
  84. .c.o:
  85.     $(CC) -c $(ALL_CFLAGS) $<
  86.  
  87. all:    cconq cconq.6
  88.  
  89. # The game itself.
  90.  
  91. cconq: $(OBJS) $(KERNEL_LIB) $(LOW_LIB)
  92.     rm -f cconq
  93.     $(CC) -o cconq $(ALL_CFLAGS) $(OBJS) $(KERNEL_LIB) $(LOW_LIB) $(CURSES_LIB)
  94.  
  95. $(KERNEL_LIB):
  96.     (cd ../kernel; make libconq.a)
  97.  
  98. $(LOW_LIB):
  99.     (cd ../kernel; make libconqlow.a)
  100.  
  101. # Man pages.
  102.  
  103. cconq.6:    cconq.6in ../kernel/cmdline.6in
  104.     sed -e '/.so ...kernel.cmdline.6in/r $(srcdir)/../kernel/cmdline.6in' -e '/.so ...kernel.cmdline.6in/d' $(srcdir)/cconq.6in >cconq.6.new
  105.     $(srcdir)/../move-if-change cconq.6.new cconq.6
  106.  
  107. # Installation.
  108.  
  109. install: all install-only
  110.  
  111. install-only:
  112.     srcroot=`cd $(srcroot); pwd`; export srcroot; \
  113.     $(INSTALL_PROGRAM) cconq $(bindir); \
  114.     $(INSTALL_DATA) cconq.6 $(man6dir)
  115.  
  116. # Cleanliness support.
  117.  
  118. clean:
  119.     rm -f *.o core
  120.     rm -f cconq *.conq *.xconq
  121.  
  122. distclean: clean
  123.     rm -f Makefile config.status
  124.  
  125. extraclean: distclean
  126.     rm -f *~* .*~*
  127.  
  128. realclean: distclean
  129.  
  130. Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  131.     $(SHELL) config.status
  132.  
  133. # Dependencies.
  134.  
  135. cconq.o:    $(ALL_H) $(C_H)
  136. ccmd.o:        $(ALL_H) $(C_H)
  137. cdraw.o:    $(ALL_H) $(C_H)
  138.